import React from 'react';
import {
	Button,
	View,
	Text,
} from 'react-native'

export const MyScreen = ({
	navigation,
	desc
}) => (
	<View>
    <Text>我的页面</Text>
    <Button
        onPress={() => navigation.navigate('Login',{name:'首页'})}
        title="我的"
      />
  </View>
)
export const LoginScreen = ({
	navigation,
	desc
}) => (
	<Login navigation={navigation} />
)
export const CommentScreen = ({
	navigation,
	desc
}) => (
	<View>
    <Text>这个是评论页面</Text>
  </View>
)
export const DetailScreen = ({
	navigation,
	desc
}) => (
	<View>
    <Text>这个是详情页面</Text>
     <Button
        onPress={() => navigation.navigate('Detail',{name:'首页'})}
        title="跳转评论页面"
      />
  </View>
)

export const MyNavScreen = ({
	navigation,
	banner
}) => (
	<ScrollView>
    <SafeAreaView forceInset={{ horizontal: 'always' }}>
  
      <Button
        onPress={() => navigation.navigate('MessageTab', { name: 'Jordan' })}
        title="详情页面"
      />
      <Button
        onPress={() => navigation.navigate('NotifSettings')}
        title="列表页面"
      />
      <Button
        onPress={() => navigation.navigate('MessageTab')}
        title="评论页面"
      />
      <Button onPress={() => navigation.goBack(null)} title="Go back" />
    </SafeAreaView>
  </ScrollView>
);


/**
 * 点击事件调用
 * @param  {[type]} options.navigation [description]
 * @return {[type]}                    [description]
 */
export const MyNotificationsSettingsScreen = ({
	navigation
}) => (
	<MyNavScreen banner="调用单页面" navigation={navigation} />
)
export const MyProfileScreen = ({
	navigation
}) => (
	<MyNavScreen
    banner={`${navigation.state.params.name}s Profile`}
    navigation={navigation}
  />
)
export const ListScreen = ({
	navigation,
	desc
}) => (
	<View>
     <Button
        onPress={() => navigation.navigate('Detail',{ name: 'Jordan' })}
        title="列表页面"
      />
  </View>
)